Attribute VB_Name = "modUtils"
Public Function LogMessage(ByVal sBuffer As String, sSource As String, Optional sName As String)
  
  Dim sFileName As String
  
  sBuffer = Now & ": " & sSource & ", " & sBuffer
  
  If (Len(sName) = 0) Then
    sName = App.EXEName
  End If
  
  sFileName = App.Path + "\" & sName & "-" & Format(Now, "YYYY-MMM-DD") & ".log"
  Open sFileName For Append As #1
  Print #1, sBuffer & " "
  Close #1
   
  Exit Function
End Function


